import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select

drive = webdriver.Chrome()
drive.maximize_window()
drive.get("file://D:/code/WebAutoTest/HTML/iframe_test.html")
time.sleep(3)
# 通过id进入iframe
drive.switch_to.frame("iframe_id")
drive.find_element(By.XPATH, "//span[text()='番剧']").click()
time.sleep(3)
drive.close()
